package com.cloudkinto.vo.order.returns.pack;

import com.cloudkinto.common.utils.MathUtils;
import com.cloudkinto.dto.order.returns.pack.OrPackDetailDto;
import com.cloudkinto.vo.file.FileMsg;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class OrPackDetailRes extends OrPackDetailDto {
    @ApiModelProperty("oms长 -英制")
    private Double lengthBs;

    @ApiModelProperty("oms宽")
    private Double widthBs;

    @ApiModelProperty("oms高")
    private Double heightBs;

    @ApiModelProperty("oms重")
    private Double weightBs;


    @ApiModelProperty("wms长")
    private Double lengthW_bs;

    @ApiModelProperty("wms宽")
    private Double widthW_bs;

    @ApiModelProperty("wms高")
    private Double heightW_bs;

    @ApiModelProperty("wms重")
    private Double weightW_bs;

    @ApiModelProperty("附件")
    private FileMsg file;

    public FileMsg getFile() {
        if (file == null) return new FileMsg();
        return file;
    }

    public Double getLengthBs() {
        if (lengthBs != null) {
            return MathUtils.numberFormat(lengthBs, 4);
        }
        return null;
    }

    public Double getWidthBs() {
        if (weightBs != null) {
            return MathUtils.numberFormat(widthBs, 4);
        }
        return widthBs;
    }

    public Double getHeightBs() {
        if (heightBs != null) {
            return MathUtils.numberFormat(heightBs, 4);
        }
        return null;
    }

    public Double getWeightBs() {
        if (weightBs != null) {
            return MathUtils.numberFormat(weightBs, 4);
        }
        return null;
    }

    public Double getLengthW_bs() {
        if (lengthW_bs != null) {
            return MathUtils.numberFormat(lengthW_bs, 4);
        }
        return null;
    }

    public Double getWidthW_bs() {
        if (widthW_bs != null) {
            return MathUtils.numberFormat(widthW_bs, 4);
        }
        return null;
    }

    public Double getHeightW_bs() {
        if (heightW_bs != null) {
            return MathUtils.numberFormat(heightW_bs, 4);
        }
        return null;
    }

    public Double getWeightW_bs() {
        if (weightW_bs != null) {
            return MathUtils.numberFormat(weightW_bs, 4);
        }
        return null;
    }
}
